home *** CD-ROM | disk | FTP | other *** search
/ Rat Attack (UK) (Digital Press Kit - Summer '99) / Rat Attack (UK) (Digital Press Kit - Summer '99).bin / RAT01.DIR / 00008_Script_Go to Frame < prev    next >
Text File  |  1999-04-26  |  2KB  |  66 lines

  1. -- Frame   Go to/Play Number
  2.  
  3. -- nav
  4. -- drag to a sprite or a frame
  5. -- goto a frame on author selected event
  6. -- also functions through lingo by handling message 'initGotoFrame', 
  7. -- for example if this behavior was assigned to sprite 5, use
  8. -- sendsprite 5, #initGotoFrame
  9.  
  10.  
  11. property  whichFrame, whichEvent, playmode
  12.  
  13. on initGotoFrame me
  14.   init me
  15. end
  16.  
  17. on mouseUp me
  18.   if whichEvent = #mouseup    then init me
  19. end
  20.  
  21. on prepareFrame me
  22.   if whichEvent = #prepareframe then init me
  23. end
  24.  
  25. on exitFrame me
  26.   if whichEvent = #exitframe  then init me
  27. end
  28.  
  29. on init me
  30.   if the playmode of me = #"Play and Return" then
  31.     play frame (the whichframe of me)
  32.   else   
  33.     go frame (the whichframe of me)   
  34.   end if
  35. end
  36.  
  37. ---
  38.  
  39. on getPropertyDescriptionList  
  40.   set p_list = [ ¼
  41.     #WhichFrame: [ #comment:   "Destination Frame:", ¼
  42.                     #format:   #integer, ¼
  43.                    #default:    1 ], ¼
  44.     #WhichEvent: [ #comment:   "Initializing Event:", ¼
  45.                     #format:   #symbol, ¼
  46.                      #range: [ #MouseUp, #PrepareFrame, #ExitFrame, #InitGotoFrame], ¼
  47.                    #default:   #MouseUp ], ¼
  48.       #playMode: [ #comment:   "Play Mode:", ¼
  49.                     #format:   #symbol, ¼
  50.                      #range: [ #"Go to", #"Play and Return" ], ¼
  51.                    #default:   #"Go to" ] ¼
  52.   ]
  53.   return p_list
  54.   
  55. end
  56.  
  57. on getBehaviorDescription
  58.   return ¼
  59. "Moves the Playback Head to the designated frame when the specified event occurs.  Drag to a sprite or frame in the script channel." && RETURN & ¼
  60. "PARAMETERS:" && RETURN & ¼
  61. "ò Destination Frame - Enter the number of the desired frame."  && RETURN & ¼
  62. "ò Initializing Event - Choose the event that triggers the behavior." && RETURN & ¼
  63. "ò Play Mode - Choose Play and Return to make the Playback Head return to the current location when the Play Done behavior is encountered. Choose Go To to make the Playback Head continue from the specified frame until explicitly sent to a new location."
  64. end
  65.  
  66.